from google.appengine.ext import db

class Thing(db.Model):
  thingid = db.StringProperty()
  assigned = db.BooleanProperty(default=False)
  author = db.StringProperty()
  title = db.StringProperty()
  created = db.DateTimeProperty(auto_now_add=True)

class User(db.Model):
  name = db.StringProperty()
  uniqueid = db.StringProperty()
  created = db.DateTimeProperty(auto_now_add=True)

class Annotation(db.Model):
  type = db.StringProperty()
  content = db.StringProperty()
  about = db.ReferenceProperty(Thing)
  user = db.ReferenceProperty(User)
  created = db.DateTimeProperty(auto_now_add=True)

